$(document).ready(function () {
    $(".toplist li:odd").addClass("bg");
    window.onload = window.onscroll = window.onresize = function () {
        var ht = $('#header').height();
        if ($(window).scrollTop() < ht) {
            $('.p-side').removeClass('guding');
            $('.p-side').removeClass('guding2')
        } else {
            $('.p-side').removeClass('guding');
            $('.p-side').addClass('guding2')
        }
    }
});
$(function () {
    $(function () {
        $(window).scroll(function () {
            if ($(window).scrollTop() > 300) {
                $("#gotop").fadeIn(500)
            } else {
                $("#gotop").fadeOut(500)
            }
        });
        $("#gotop").click(function () {
            $('body,html').animate({scrollTop: 0}, 400);
            return false
        })
    })
});
/**
 * 推荐
 * @param e
 */
function showpop(e) {
    $.get(e, function (e) {
        alert(e.replace("<br />", "").replace(/(\<br \/\>)/g, "\r\n"))
    })
}
/**
 * 阅读次数
 * @param e
 */
function readbook(e) {
    $.get("/book/article/articlevisit.html?id=" + e)
}
function vote_nomsg(e,obj) {
    $.get("/book/article/uservote.html?id=" + e ,function (data) {
        alert("推荐成功！");
    });
    obj.removeAttribute("onclick");
    var classVal=obj.getAttribute("class");
    classVal=classVal.replace("item red","item")
    obj.setAttribute("class",classVal);
}
function killErrors() {
    return !0
}
function get_cookie_value(e) {
    var t = e + "=", n = "";
    return document.cookie.length > 0 && (offset = document.cookie.indexOf(t), -1 != offset && (offset += t.length, end = document.cookie.indexOf(";", offset), -1 == end && (end = document.cookie.length), n = unescape(document.cookie.substring(offset, end)))), n
}
function login() {
    jieqiUserInfo.jieqiUserId > 0 ? (document.writeln('<a href="/userdetail.php" class="userinfo" style=" background-image:none" title="个人资料">' + unescape(jieqiUserInfo.jieqiUserName_un) + "</a>"), document.writeln('<a href="/modules/article/bookcase.php" class="bookcase" style=" background-image:none">我的书架</a>'), document.writeln('<a href="/logout.php" class="logout" style=" background-image:none">退 出</a>')) : document.writeln("<a class='login' href=\"/login.php\">登 录</a><a class='register' href=\"/register.php\">注 册</a>")
}
window.onerror = killErrors;
var jieqiUserInfo = new Array;
if (jieqiUserInfo.jieqiUserId = 0, jieqiUserInfo.jieqiUserUname = "", jieqiUserInfo.jieqiUserName = "", jieqiUserInfo.jieqiUserGroup = 0, document.cookie.indexOf("jieqiUserInfo") >= 0) {
    var cookieInfo = get_cookie_value("jieqiUserInfo");
    for (start = 0, offset = cookieInfo.indexOf(",", start); offset > 0;)tmpval = cookieInfo.substring(start, offset), tmpidx = tmpval.indexOf("="), tmpidx > 0 && (tmpname = tmpval.substring(0, tmpidx), tmpval = tmpval.substring(tmpidx + 1, tmpval.length), jieqiUserInfo[tmpname] = tmpval), start = offset + 1, offset < cookieInfo.length ? (offset = cookieInfo.indexOf(",", start), -1 == offset && (offset = cookieInfo.length)) : offset = -1
}
var isIE = !!window.ActiveXObject, isIE6 = isIE && !window.XMLHttpRequest, isIE8 = isIE && !!document.documentMode, isIE7 = isIE && !isIE6 && !isIE8, SiderBar = {
    Reader: function (e, t) {
        var n = '<div class="reader_mark" id=\'mark_reader\'><a href="javascript:;" onclick="showpop(\'/modules/article/addbookcase.php?bid=' + e + "&cid=" + t + '&ajax_request=1\');">加入书签</a><hr/><a href="javascript:;" onclick="showpop(\'/modules/article/uservote.php?id=' + e + "&ajax_request=1');\">投票推荐</a></div>";
        $("#content").append(n);
        var i = ($(document).width() - $("#content").width()) / 2 + $("#content").width(), o = $("#content").offset().top;
        $("#mark_reader").css({left: i, top: o}), $(window).resize(function () {
            var e = ($(document).width() - $("#content").width()) / 2 + $("#content").width(), t = $("#content").offset().top;
            $("#mark_reader").css({left: e, top: t})
        })
    }
};
function gotop() {
    document.writeln("<div id=\"gotop\"><a href=\"#\" class=\"got\"><i>返回顶部</i></a></div>")
}
function share() {
    document.writeln('<div id="baidushare"><span><ul id="navmenu"><li><a title="分享" class="jzfx"><b>分享</b></a><ul><div class="jzfxn" id="jzfxn"><h3>分享到：</h3><div class="bdsharebuttonbox" data-tag="share_2"><a title="分享到QQ空间" href="#" class="bds_qzone" data-cmd="qzone">QQ空间</a><a title="分享到新浪微博" href="#" class="bds_tsina" data-cmd="tsina">新浪微博</a><a title="分享到QQ收藏" href="#" class="bds_qq" data-cmd="qq">QQ收藏</a><a title="分享到腾讯微博" href="#" class="bds_tqq" data-cmd="tqq">腾讯微博</a><a title="分享到人人网" href="#" class="bds_renren" data-cmd="renren">人人网</a><a title="分享到腾讯朋友" href="#" class="bds_tqf" data-cmd="tqf">腾讯朋友</a><a title="分享到百度贴吧" href="#" class="bds_tieba" data-cmd="tieba">百度贴吧</a><a title="分享到QQ好友" href="#" class="bds_sqq" data-cmd="sqq">QQ好友</a><a title="分享到百度空间" href="#" class="bds_hi" data-cmd="hi">百度空间</a><a title="分享到我的搜狐" href="#" class="bds_isohu" data-cmd="isohu">我的搜狐</a><a title="分享到微信" href="#" class="bds_weixin" data-cmd="weixin">微信</a><a title="分享到网易微博" href="#" class="bds_t163" data-cmd="t163">网易微博</a><a title="分享到搜狐微博" href="#" class="bds_tsohu" data-cmd="tsohu">搜狐微博</a><a title="分享到百度搜藏" href="#" class="bds_baidu" data-cmd="baidu">百度搜藏</a></div>');
    window._bd_share_config = {
        "common": {
            "bdSnsKey": {},
            "bdText": "",
            "bdMini": "2",
            "bdMiniList": false,
            "bdPic": "",
            "bdStyle": "1",
            "bdSize": "16"
        }, "share": {}
    };
    with (document)0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];
    document.writeln('</div></ul></li></ul></span>')
}
function read_tuijian() {
}
function index_top() {
}
function index_bottom() {
}
function book_top() {
}
function book_bottom() {
}
function book_bottom1() {
}
function read_ad1() {
}
function read_ad2() {
}
function read_ad3() {
}
function tongji() {
}